#include "stdafx.h"
#include "queue_test.h"

int queue_test::_random_toll = 0;

//---------------------------------------------------------------------------
void queue_test::test_init()
{	
	_queue = std::make_unique<boost::lockfree::queue<int>>(_loops);
}
//---------------------------------------------------------------------------
void queue_test::do_test()
{
	_random_toll = _input_gen();

	_queue->push(_random_toll);
	
	if(_force_context_switch)
	{
		::SwitchToThread();
	}

	_queue->pop(_random_toll);
}
//---------------------------------------------------------------------------
std::string queue_test::test_name(void)
{
	return "boost-lockfree-queue";
}
//---------------------------------------------------------------------------
